// dlg.txt

begintalkscript;

variables;

begintalknode 1;
	state = -1;
	nextstate = -1;
	condition = get_sdf(38,1) == 0;
	question = "special";
	text1 = "You descend from the mountain pass into the Storm Plains. This is a large province and, where the war has not yet scorched it, quite lovely. They are huge expanses of thick woods, green plains, and excellent farmland.";
	text2 = "Though the Storm Plains can occasionally fall victim to vicious and unpredictable tornadoes, they actually get their name from the fierce tribes that once roamed these lands. Then they were taken by the Shapers, who turned out to be even more fierce.";
	text3 = "A spur of the mountain chain you just crossed extends many miles to the southeast. Looking up to the east, you can see a road leading up to a fort guarding yet another pass.";
	text4 = "As you walk down the road, you see a skirmish ahead. A loyalist patrol appears to have trapped a rebel servile and several creations. The battle looks like it is almost done. The Shaper forces have worn down their foes and are closing in for the kill.";
	action = SET_SDF 38 1 1;

begintalknode 2;
	state = -1;
	nextstate = -1;
	condition = get_sdf(38,2) == 0;
	question = "special";
	text1 = "There is a heavy door set in the stone wall. A weather-beaten 'Keep Out' sign hangs from it.";
	text2 = "It is held shut with several quality locks. You might be able to pick them, but it will take great effort. Without the key, you probably won't be able to get in.";
	action = SET_SDF 38 2 1;

begintalknode 3;
	state = -1;
	nextstate = -1;
	condition = get_sdf(38,7) == 0;
	question = "special";
	text1 = "You step inside the crystal mine. The chambers have been dug out of the clay of the cliff face. The miners have wisely supported the low ceilings with thick logs.";
	text2 = "Before the mine was abandoned, they went to the trouble of laying down tracks. That probably means that they were going to try to remove some large crystal formations intact. Much more difficult, but very profitable if the operation was a success.";
	text3 = "Then the mine was abandoned. When you enter, you feel a deep chill that isn't at all natural. The natural magic of the crystals has attracted something more dangerous than mere miners ...";
	action = SET_SDF 38 7 1;

begintalknode 4;
	state = -1;
	nextstate = -1;
	condition = get_sdf(38,8) == 0;
	question = "special";
	text1 = "It doesn't look like anyone has used this campsite in months. Anyone humanoid, anyway. Several rockslides have left piles of gravel and debris around the base of the cliff.";
	text2 = "Worse, there are tracks, but they are from large, insectoid creatures. Some of them are fresh.";
	action = SET_SDF 38 8 1;

begintalknode 5;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "Suddenly, clawbugs crawl out of the piles of rocks! You are in the middle of an ambush of hungry, nasty bugs.";


begintalknode 6;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "Suddenly, a few clawbugs crawl out of the piles of rock at the end of this path! They decide to interrupt their excavation of a new lair to hunt for meat.";

begintalknode 7;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "__";

begintalknode 8;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "The sign says:";
	text2 = "  DINARA'S CLAIM";
	text3 = "  KEEP OUT!";
	

begintalknode 9;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "The sign says:";
	text2 = "  Kratoa-Kel, Mera-Tev - North";
	text3 = "  Perikalia - Southwest";
	text4 = "  Fort Defiance - East";
	text5 = "  Fort Vengeance, Fort Rockfall - Southeast";

begintalknode 10;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "There are two ornks in this pen, waiting unhappily to be turned into dinner and leather garments.";

begintalknode 11;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "There are two bounty hunters sitting at this table, drinking and muttering silently to each other. Batons hang from their belts. Their armor is marred with many small dents and patches of rust.";
	text2 = "When they see that you are nearby, they stop talking and glare at you until you go away.";
	
begintalknode 12;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "__";
	
//

begintalknode 30;
	state = -1;
	nextstate = 30;
	condition = 1;
	question = "Name";
	text1 = "These soldiers have just emerged victorious against a rebel servile and two artila. One of them kicks the dead servile onto its back and inspects his face. A baton falls from his hand. They don't bother to loot the body.";
	text2 = "When you get close, their commander whirls around and whips his blade out. _You! Stop there! I'm Captain Reigert, and these are Alwan's lands. Let's see some papers. Quickly. Or you'll end up like our friend here._";
	text3 = "The other soldiers get ready to attack you. They would be a dangerous bunch even if they weren't already charged up by their recent battle.";
	code =
		sf(38,1,1);
	break;
	
begintalknode 31;
	state = 30;
	nextstate = -1;
	condition = 1;
	question = "I don't have any papers. (Lie.)";
	text1 = "Reigert nods. _Then we have our orders. If you aren't a rebel or a spy, I'm sorry. Be more careful in the next life._";
	text2 = "_Attack._";
	action = END_TALK;
	code =
		set_attitude(1001,10);
	break;
	
begintalknode 32;
	state = 30;
	nextstate = -1;
	condition = 1;
	question = "I don't have to show anything to you.";
	text1 = "Reigert shakes his head. _Alwan's orders are clear. If we're going to purge the Storm Plains of spies and rebels ... Well, no need to explain it to you. You won't be here long._";
	text2 = "";
	text2 = "_Attack._";
	action = END_TALK;
	code =
		set_attitude(1001,10);
	break;

begintalknode 33;
	state = 30;
	nextstate = 31;
	condition = 1;
	question = "Keep calm. Here are my papers. (Show them.)";
	text1 = "You hand Rawal's papers to Reigert. He looks them over, nods, and hands them back to you. _Those are signed by Rawal. Those won't get you very far. If I were you, I'd head to Perikalia and get a better pass._";
	text2 = "_General Alwan is allowing a pass from any province, but that could change any day. Better you be safe. Not everyone is as patient as we are._";
	text3 = "_Let's get back to the fort._ They turn to leave.";

begintalknode 34;
	state = 31;
	nextstate = -1;
	condition = 1;
	question = "How do I get to Perikalia?";
	text1 = "He looks impatient. _There are several routes. The safest one is to go south to the ruins and turn west. The other roads haven't been cleared of rogues yet. They will be soon, though._";

begintalknode 35;
	state = 31;
	nextstate = -1;
	condition = 1;
	question = "What fort are you from?";
	text1 = "Reigert points up at the mountains to the east. _Fort Defiance. One of the three forts holding back the foe on the other side. That's right. We're holding them back. Thanks to General Alwan._";

begintalknode 36;
	state = 31;
	nextstate = -1;
	condition = 1;
	question = "Tell me about the servile you killed.";
	text1 = "The soldiers looks irritated. _Your papers say we should treat you like a Shaper. Nonsense. You're an outsider, and you aren't a soldier. We won't be questioned by you._";
	text2 = "_You're in Alwan's lands now. You'd better learn to keep your place._";
	text3 = "And, with that, they turn and march away.";
	action = END_TALK;
	
begintalknode 37;
	state = 31;
	nextstate = -1;
	condition = 1;
	question = "Goodbye, then.";
	text1 = "Reigert nods. _Good day. Don't forget to try to get better papers. And some friendly advice to you._";
	text2 = "_Don't know how you acted up north, but you're probably used to a lack of discipline._ He gives the dead servile a little kick. _You're in Alwan's lands now. You'd better learn to keep your place._";
	text3 = "And, with that, they turn and march away.";
	action = END_TALK;

//

begintalknode 50;
	state = -1;
	nextstate = 50;
	condition = 1;
	question = "Name";
	text1 = "This small inn is run by a stout, middle-age woman. She wears a thick leather jerkin and holds a baton in her hand. She seems very upset about something.";
	text2 = "When she sees you enter, she says, _Talk to me. I'm Giselle. I'm glad they sent someone before they left. Typical of the soldiers to make a big mess and not bother to clean it up._";
	text3 = "She walks up to the left door and unlocks it. Then she returns to her post behind the bar. _You open it. I'll help._";
	text4 = "Giselle waves her baton at one of the doors to the north. _Why are you still talking? Help me clean up the mess!_";
	code =
		if (gf(38,10) == 0) {
			sf(38,10,1);
			rs(4);
			sf(38,16,1);
			}
			else {
				rs(1); rs(2); rs(3);
				}
	break;
	
begintalknode 51;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "I'm not sure what you're talking about.";
	text1 = "_Oh, no! You bounty hunters take down those rebels outside, and you don't bother to hunt the escapees down. I know how you work. Let them hole up in my inn? I don't think so!_";
	text2 = "";

	
begintalknode 52;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "What is behind that door?";
	text1 = "_I'm not sure. They ran in too quick. The man in there, he got a real good look at them. But I don't think he's in any condition to tell you about them._";
	text2 = "_If you're going to get my guests killed, at least help clean up the mess!_";
	
begintalknode 53;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "Sorry. I'm going.";
	text1 = "_Don't you dare! If you go, I'll make sure someone hears what you did! I'll make trouble for you up at the fort, I will._";
	text2 = "_Please. Just open the door and help me kill them. You can keep anything you find in the room. All right?_ She turns and points her baton at the door.";
	action = END_TALK;
	
begintalknode 54;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "All right. I'll help you.";
	text1 = "_Good. Don't act like you're doing me any favors._";
	text2 = "_Just open the door and help me kill them. You can keep anything you find in the room. All right? Ready?_ She turns and points her baton at the door.";
	action = END_TALK;
	
begintalknode 58;
	state = -1;
	nextstate = 60;
	condition = 1;
	question = "";
	text1 = "Now that the rogues are dead and Giselle has calmed down, she takes a look at you. She immediately realizes that you aren't exactly who she thought you were.";
	text2 = "_Oh. I ... Sorry. I thought you were with the other bounty hunters. The ones who spotted the rogues outside and tipped off the fort._";
	text3 = "_Well, anyway, welcome to my inn. Care for a drink for the road?_";
	text4 = "Giselle keeps an eye on you and nervously wipes off the bar with a towel. _Care for a drink? Before you go, I mean._";
		code =
		if (gf(38,11) == 0) {
			sf(38,11,1);
			award_party_xp(100,18);
			rs(4);
			}
			else {
				rs(1); rs(2); rs(3);
				}
	break;

begintalknode 59;
	state = 60;
	nextstate = -1;
	condition = 1;
	question = "I could use a drink.";
	text1 = "You conclude your business.";	
	code = 
		begin_shop_mode("Giselle",
		  "Giselle has the standard assortment of beverages. Most mundane, a few not. In return for helping her, she gives you a discount.",
		  35,0,0);	
	break;
	
begintalknode 60;
	state = 60;
	nextstate = 61;
	condition = 1;
	question = "Tell me about the lands around here.";
	text1 = "She looks very nervous. _I ... I don't know you. You might be a spy. General Alwan has been very ... It's not a good idea to share too much information._";
	text2 = "_If you're looking for work, Perikalia is the best place to go. Take the road west or south and follow the signs._";
	
begintalknode 61;
	state = 60;
	nextstate = 62;
	condition = gf(100,15) < 2;
	question = "You mentioned a fort?";
	text1 = "_I ... Oh, yes. There are three. No harm in talking about that. Everyone knows that. No trouble there._";
	text2 = "_There are three forts. Up in the mountains to the east. Vengeance. Rockfall. Defiance. They keep us safe from what's on the other side._";
	text3 = "_I'd just be careful about going up there._";

begintalknode 62;
	state = 60;
	nextstate = -1;
	condition = 1;
	question = "I'll be going, then.";
	text1 = "She nods. _Safe travels. Thanks for the help with the worms._";
	action = END_TALK;

begintalknode 63;
	state = 61;
	nextstate = -1;
	condition = 1;
	question = "What do you think of General Alwan?";
	text1 = "She smiles. _Don't get the wrong idea about me. He is a hero, as far as I'm concerned. Most outsiders you meet in the Storm Plains will tell you so. He's the one who finally beat back the rebels._";
	text2 = "_He's had to be harsh to do it. But I'd rather be able to sleep in my bed at night without worrying about an Unbound killing me in the morning._";

begintalknode 64;
	state = 61;
	nextstate = -1;
	condition = 1;
	question = "Tell me about Perikalia.";
	text1 = "_That's the capital. It's where General Alwan commands. All you ... warriors, bounty hunters, whatever you are, they all end up there eventually._";

begintalknode 65;
	state = 62;
	nextstate = -1;
	condition = 1;
	question = "What is on the other side?";
	text1 = "_The rebels. The rogues. All the fighting. All of the monsters they're trying to slip through. That are held back by Alwan and the forts._";

begintalknode 66;
	state = 62;
	nextstate = -1;
	condition = 1;
	question = "Why shouldn't I go up there?";
	text1 = "_Well, I hear that they are very, very touchy. If someone goes up there without the right papers, the right permission, they will get treated like spies. They might give you the chance to leave right away. Or they might not._";
	text2 = "";


//

begintalknode 70;
	state = -1;
	nextstate = 70;
	condition = 1;
	question = "Hartwin";
	text1 = "In your travels, you have developed a natural talent to identify the eccentric and the potentially dangerous. It helps in one's effort to survive. This man is probably not the latter, but he's definitely the former.";
	text2 = "He is a tanner. He makes his own leather, in small batches, and uses it to make garments. He is probably this far from civilization because of the horrible smell. He has long since ceased to notice it.";
	text3 = "When he sees you enter, he nods and goes back to scraping a skin. He ignores you while he finishes the job.";
	text4 = "Then he stands, turns, and wipes his filthy hands off on his apron. _I am Hartwin,_ he says. _Welcome to my shop. It is nice to be back and have customers again._";
	text5 = "Hartwin struggles painfully to make small talk with you while he shows you the products of his craft. He seems eager to go back to the butchering of his ornks and the processing of their skins.";
	action = INTRO;

begintalknode 71;
	state = 70;
	nextstate = 71;
	condition = 1;
	question = "Tell me about your shop.";
	text1 = "_Oh. I make leather. And then I work it. I make things. Quality garments. For the really particular._";

begintalknode 72;
	state = 70;
	nextstate = -1;
	condition = gf(100,15) > 1;
	question = "Aren't you worried being out here alone?";
	text1 = "_I am. I will be going soon. Back to the safety of the city. Now that the rogues have broken through the line again._";

begintalknode 73;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "Can I see your wares?";
	text1 = "You conclude your business.";	
	code = 
		begin_shop_mode("Hartwin's Leather",
		  "For all of his filth and eccentricity, Hartwin is capable of making surprisingly good leather goods.",
		  36,4,0);	
	break;
	
begintalknode 74;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "Tell me about this area.";
	text1 = "He looks at the door, confused. _Oh. You want to know ... There is a sign out by the road. It will tell you where everything is._";

begintalknode 75;
	state = 71;
	nextstate = 75;
	condition = 1;
	question = "Why don't you buy leather from a larger tannery?";
	text1 = "He seems slightly offended. _But then how could I trust them? I find I can only be really comfortable, really trust in my work, if it is leather I made myself. Why, I wouldn't even be able to butcher the animal!_";

begintalknode 76;
	state = 71;
	nextstate = -1;
	condition = 1;
	question = "Your work is exceptionally good?";
	text1 = "He looks down at his hands. He doesn't seem to notice the filth. _Oh. It is a knack. Something I just do. If I spend enough time. If I'm really careful. If I concentrate. Things just turn out well._";
	text2 = "_It takes a long time to make something right. So I have to charge a lot._";

begintalknode 77;
	state = 70;
	nextstate = 72;
	condition = gf(100,15) < 2;
	question = "Aren't you worried being out here alone?";
	text1 = "_Oh. Not anymore. I just got back. I had fled to the city. But then General Alwan pushed the enemy back over the line. Then it was safe to return._";
	text2 = "_I'm only just back in business. It's good. My poor ornks missed me._";

begintalknode 78;
	state = 72;
	nextstate = -1;
	condition = 1;
	question = "So you support General Alwan?";
	text1 = "He shrugs. _There is no reason for an outsider like me to support or not support a Shaper. It's not like they ever ask my opinion._";

begintalknode 79;
	state = 72;
	nextstate = -1;
	condition = 1;
	question = "Pushed over the line?";
	text1 = "_That's what everyone calls the mountains to the east now. The line. With the three forts. That is where the soldiers held the rebels._";
	text2 = "_And then they will push them back. Scrape them away like hairs on ornkskin._";

begintalknode 80;
	state = 75;
	nextstate = -1;
	condition = 1;
	question = "Is that important?";
	text1 = "He grows very irritated. _Important? Trying to really work a piece of leather without butchering the animal is like marrying a woman without ever talking to her. Isn't that obvious?_";
	text2 = "_No, I need a moment to regain my composure. Leave me._ He turns away, highly incensed.";
	action = END_TALK;
	
//

begintalknode 90;
	state = -1;
	nextstate = 90;
	condition = 1;
	question = "Name";
	text1 = ".";
	text2 = "";
	text5 = ".";
	action = INTRO;

begintalknode 91;
	state = 90;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";
		